﻿<Window x:Class="MyWordPad.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="331" Width="508"
        WindowStartupLocation="CenterScreen">
    <Window.CommandBindings>
        <CommandBinding Command="ApplicationCommands.Open"
                        Executed="OpenCmdExecute"
                        CanExecute="OpenCmdCanExecute"/>
        <CommandBinding Command="ApplicationCommands.Save"
                        Executed="SaveCmdExecuted"
                        CanExecute="SaveCmdCanExecute"/>
    </Window.CommandBindings>
    <DockPanel>
        <Menu DockPanel.Dock="Top"     
              HorizontalAlignment="Left" Background="White" BorderBrush="Black">
            <MenuItem Header="_File" Click="FileExit_Click"> 
                <MenuItem Command="ApplicationCommands.Open"/>
                <MenuItem Command="ApplicationCommands.Save"/>
                <Separator/>
                <MenuItem Header="_Exit"
                          MouseEnter="MouseEnterExitArea"
                          MouseLeave="MouseLeaveArea" Click="FileExit_Click"/>
            </MenuItem>
            <MenuItem Header="_Edit">
                <MenuItem Command="ApplicationCommands.Copy"/>
                <MenuItem Command="ApplicationCommands.Cut"/>
                <MenuItem Command="ApplicationCommands.Paste"/>
            </MenuItem>

            <MenuItem Header="_Tools">
                <MenuItem Header="_Spelling Hints"
                              MouseEnter="MouseEnterToolsHintsArea"
                              MouseLeave="MouseLeaveArea" Click="ToolsSpellingHints_Click"/>
            </MenuItem>
        </Menu>
        <ToolBar DockPanel.Dock="Top">
            <Button Content="Exit" MouseEnter="MouseEnterExitArea"
                    MouseLeave="MouseLeaveArea" Click="FileExit_Click"/>
            <Separator/>
            <Button Content="Check" MouseEnter="MouseEnterToolsHintsArea"
                    MouseLeave="MouseLeaveArea" Click="ToolsSpellingHints_Click"
                    Cursor="Help"/>
        </ToolBar>
        <StatusBar DockPanel.Dock="Bottom" Background="Beige">
            <StatusBarItem>
                <TextBox Name="statBarText" Text="Ready"/>
            </StatusBarItem>
        </StatusBar>
        <Grid DockPanel.Dock="Left" Background="AliceBlue">
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <GridSplitter Grid.Column="0" Width="5" Background="Gray"/>
            <StackPanel Grid.Column="0" VerticalAlignment="Stretch">
                <Label Name="lblSpellingInstructions" FontSize="14" Margin="10,10,0,0">
                    Spelling Hints
                </Label>
                <Expander Name="expanderSpelling" Header="Try these"
                          Margin="10,10,10,10">
                    <Label Name="lblSpellingHints" FontSize="12"/>
                </Expander>
            </StackPanel>
            <TextBox Grid.Column="1"
                     SpellCheck.IsEnabled="True"
                     AcceptsReturn="True"
                     Name="txtData" FontSize="14"
                     BorderBrush="Blue"
                     VerticalScrollBarVisibility="Auto"
                     HorizontalScrollBarVisibility="Auto"></TextBox>
        </Grid>
    </DockPanel>
</Window>
